/****************************************************************************
** The commands module implements all the command handlers along with
** helpder functions. commands are dispatched by the cmd_dispatch function.
****************************************************************************/
#ifndef COMMANDS_H_INCLUDED
#define COMMANDS_H_INCLUDED

#include "common.h"

/*---------------------------------------------------------------------------
cmd_dispatch: dispatches a command, according to the command name. 

params:
 * cmd - command name (string)
 * args - command arguments (array of strings)

retval: TRUE if successful, FALSE otherwise

notes: 
according to the exercise, we assume that the command is valid and that 
the number of arguments is correct per the command. there is no way to 
report an invalid command or wrong number of arguments, so TRUE is 
returned even in case of a "minor" error. 
FALSE is returned only in case of a "fatal error" (out of memory, etc.), 
in which case we propagate it up and quit the application nicely.
---------------------------------------------------------------------------*/
success_t cmd_dispatch(const char * cmd, const char ** args);


#endif
